package com.icare.shop.utils;

import com.icare.shop.config.ShopAutoConfigration;
import com.icare.shop.feign.TradeFeignService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * <pre>
 *    author  : tianhaibo
 *    email   : tianhaibo@jshuii.com
 *    time    : 2020/3/23   23:20
 *    desc    :
 *    version : v1.0
 * </pre>
 */
public class StaticUtil {

private static final Log log = LogFactory.getLog(StaticUtil.class);

    private static TradeFeignService tradeFeignService;

    public static void initStaticUtil(TradeFeignService feignService){
        tradeFeignService= feignService;
    }

    public static String post(Long id){
        try {
            return tradeFeignService.getShopInfo(id);
        } catch (Exception e) {
            log.error("异常,id="+id,e);
        }
        return null;
    }
}
